home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invenzioni & Inventori
/
Invenzioni and Inventori (Eclectica Publishing) (1996).ISO
/
invenzio
/
vivid
/
getat2.dir
/
00107_Script_107
< prev
next >
Wrap
Text File
|
1996-11-09
|
4KB
|
124 lines
on caricax
global mywindow_ffg,FILENAME,BOOK_PATH,pointer
if objectp(mywindow_ffg) then forget myWindow_ffg
put char 1 to offset(".",FILENAME)-1 of FILENAME into name_
-- open file
if the machinetype = 256 then
set file=fileio(mnew,"read",BOOK_PATH&"\"&name_&".bok")
else
set file=fileio(mnew,"read",BOOK_PATH&":"&name_&".bok")
end if
set pointer to value(file(mReadFile))
file(mdispose)
-- open window (for cast copy)
set mywindow_ffg to window("pippo")
if the machinetype = 256 then
set the filename of myWindow_ffg to BOOK_PATH&"\"&name_
else
set the filename of myWindow_ffg to BOOK_PATH&":"&name_
end if
set the titlevisible of myWindow_ffg to false
set the visible of mywindow_ffg to false
copyciclex
end
on copyciclex
global pointer,lista,mywindow_ffg
set start_=500
set start_2 to 600
set lista=[]
set loop=0
repeat with loop=0 to (count(pointer)/3-1)
if the freebytes <100000 then
alert "MEMORIA INSUFFICIENTE PER CONTENERE TUTTI GLI OGGETTI."
exit repeat
end if
set tipo=value(getat(pointer,loop*3+1))
if tipo=-1 then exit repeat --esce se finito il ciclo
set tipo2=getat(pointer,loop*3+2)
if tipo2 = "#bitmap2" then
duplicate cast 599,start_
set the filename of cast start_ to getat(pointer,loop*3+4)
set cx to the width of cast start_ /2
set cy to the height of cast start_ /2
set the regpoint of cast start_ to point (cx,cy)
-- importfileinto cast start_,getat(pointer,loop*3+4)
add lista,[#DESC:getat(pointer,loop*3+3),#PATH:"non used",#TEXT:EMPTY,#CAST:start_]
end if
if tipo=#digitalvideo then --▓ un filmato e quindi lo carica...
SET FFF TO FILEIO(MNEW,"READ",getat(pointer,loop*3+4))
IF OBJECTP(FFF) THEN
set ree = fff(mgetlength)
FFF(MDISPOSE)
END IF
set start_movie to start_2
set the filename of member start_2 to getat(pointer,loop*3+4)
set start_2 to start_2 +1
if ree/1024>900 then
set the directtostage of cast start_movie to 1
set the controller of cast start_movie to 1
set waay to "control"
else
set waay to "nocontrol"
end if
set the pausedatstart of cast start_movie to 1
add lista,[#DESC:getat(pointer,loop*3+3),#PATH:waay,#TEXT:EMPTY,#CAST:start_movie]
end if
if tipo=#text then -- Φ un testo e quindi setta la lista e basta
add lista,[#DESC:getat(pointer,loop*3+2),#PATH:"non used",#TEXT:getat(pointer,loop*3+3),#CAST:EMPTY]
end if
if tipo=#bitmap then -- qui Φ un'altra storia in quanto dobbiamo utilizzare il BASIC.dir (la sua copia...)
global NUMERO_CAST,DATI_BITMAP
set NUMERO_CAST= value(getat(pointer,loop*3+3))
SET TRY to 0
SET DATI_BITMAP to 0
repeat While 1
set TRY = TRY+1
tell mywindow_ffg to Get_cast
if PICTUREP(DATI_BITMAP) or TRY>5 then exit REPEAT
REPEAT With rrec= 1 to 200
END REPEAT
end repeat
if the freebytes>500000 then
duplicate cast 31,cast start_
if PICTUREP(DATI_BITMAP) then
set the picture of cast start_ to DATI_BITMAP
set cx to the width of cast start_ /2
set cy to the height of cast start_ /2
set the regpoint of cast start_ to point (cx,cy)
end if
add lista,[#DESC:getat(pointer,loop*3+3),#PATH:"non used",#TEXT:EMPTY,#CAST:start_]
end if
end if
set start_=start_+1
end repeat
add lista,-1
forget mywindow_ffg
end